From de4c6cd63fc94fd2d196cbbe6a8d76bf51dd51b1 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 14 Aug 2006 01:49:13 +0000 Subject: [PATCH] Pick up an option lost in merging. Let labels be optional in KML. --- kml.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kml.c b/kml.c index 3fc995bbb..718c4b6a5 100644 --- a/kml.c +++ b/kml.c @@ -32,6 +32,7 @@ static char *opt_floating = NULL; static char *opt_extrude = NULL; static char *opt_trackdata = NULL; static char *opt_units = NULL; +static char *opt_labels = NULL; static int export_lines; static int export_points; @@ -89,6 +90,9 @@ arglist_t kml_args[] = { {"units", &opt_units, "Units used when writing comments ('s'tatute or 'm'etric)", "s", ARGTYPE_STRING, ARG_NOMINMAX }, + {"labels", &opt_labels, + "Display labels on track and routepoints (default = 1)", + "1", ARGTYPE_BOOL, ARG_NOMINMAX }, ARG_TERMINATOR }; @@ -516,7 +520,9 @@ static void kml_output_point(const waypoint *waypointp, const char *style) if (export_points) { kml_write_xml(1, "\n"); - kml_write_xmle("name", waypointp->shortname); + if (atoi(opt_labels)) { + kml_write_xmle("name", waypointp->shortname); + } kml_write_xml(0, "\n"); kml_write_xml(0, "%s\n", style); kml_output_description(waypointp); -- 2.30.2